<!-- 使用方法, 在进入前设置uniStorage { title, content} -->

<template>
  <view class="text-details-main">
    <rich-text class="body" :nodes="detail.content"></rich-text>
  </view>
</template>

<script>
import { uniGetStorageSync } from '../util/funcs';
import { ROUTER_OBJ } from '../util/misc';

export default {
  data() {
    return {
      detail: {
        title: '',
        content: '',
      },
    };
  },
  mounted() {
    this.detail = uniGetStorageSync(ROUTER_OBJ);
    // console.log(this.detail)
    uni.setNavigationBarTitle({
      title: this.detail.title,
    });
  },
};
</script>

<style lang="scss" scoped>
@import '../assets/styles/global';
.text-details-main {
  @include center;
  flex-direction: column;
  padding: 32rpx;
  .title {
    width: 100%;
    height: 40rpx;
    font-size: 36rpx;
    line-height: 40rpx;
    color: #06121f;
  }

  .body {
    margin-top: 38rpx;
    width: 688rpx;
    height: 1020rpx;
    font-size: 28rpx;
    line-height: 48rpx;
    color: #06121f;
  }
}
</style>
